package com.tb.v1.common.base;

import java.util.List;

/**
 * @author: tangBin
 * @Date: 2020/6/4 0004 12:15
 * @Description:
 */
public abstract class BaseServiceImpl<T> implements IBaseService<T> {

    public abstract IBaseDao<T> getBaseDao();


    public T getEntityById(Long id) {
        return getBaseDao().getEntityById(id);
    }

    public List<T> getAll() {
        return getBaseDao().getAll();
    }

    public int deleteEntity(Long id) {
        return getBaseDao().deleteEntity(id);
    }

    public int saveEntity(T t) {
        return getBaseDao().saveEntity(t);
    }

    public int updateEntity(T t) {
        return getBaseDao().updateEntity(t);
    }
}
